package com.sjyy.common.dict;

/**
 * 订单状态,按实际流转状态排序
 */
public enum OrderOperationEnum {
	ORDER_QXDD("取消订单", -2),
	ORDER_KHQXDD("客户取消订单", -1),
	ORDER_KHXD("客户下单", 1),
	ORDER_QRDD("确认订单", 2),
	ORDER_CGFJ("正在采购分拣", 7),
	ORDER_FJWC("分拣完成", 6),
	ORDER_SPCK("商品出库", 3),
	ORDER_CXCK("修改订单状态为待收货状态", -3),
	ORDER_WCDD("完成订单", 4),
	
	ORDER_CXHK("撤销订单回款",-4), 
	ORDER_SDHK("订单回款", 5),

	ORDER_PLHK("批量回款", 8),
	ORDER_POS_HK("POS机回款", 9),
	
	ORDER_XJSK("现金收款", 101),
	ORDER_XGXJSK("修改现金收款", 102),
	
	ORDER_POS_BPP("POS回款不匹配", 110),
	ORDER_POS_SB("POS支付失败", 113),
	ORDER_POS_CXPP("POS撤销匹配", -5),
	ORDER_POS_CXBPP("POS撤销不匹配", -115),
	ORDER_POS_CXSB("POS支付失败", -113),
	ORDER_POS_YHK("订单已回款时收到POS信息", -111),
	ORDER_POS_QT("其他支付情况", -112),
	
	ORDER_MERGER("合并订单", 201),
	ORDER_XGDDXQ("修改订单", 202),
	ORDER_XZDDXQ("新增订单详情", 203),
	ORDER_SCDDXQ("删除订单详情", 204),
	
	ORDER_XJQHD("生成缺货单", 301),
	ORDER_XGQHD("修改缺货单", 302),
	ORDER_SCQHD("删除缺货单", 303),
	
	ORDER_XJJSD("生成拒收单", 401),
	ORDER_XGJSD("修改拒收单", 402),
	ORDER_SCJSD("删除拒收单", 403),
	ORDER_SHJSD("审核通过拒收单", 404),
	
	ORDER_XJTHD("生成退货单", 501),
	ORDER_XGTHD("修改退货单", 502),
	ORDER_SCTHD("删除退货单", 503),
	ORDER_SHTHD("审核通过退货单",504)
	;

	private String operationString;

	private int key;

	private OrderOperationEnum(String operationString, int key) {
		this.operationString = operationString;
		this.key = key;
	}

	public static String getOrderOperationStr(int key) {
		for (OrderOperationEnum a : OrderOperationEnum.values()) {
			if (a.getKey() == key) {
				return a.operationString;
			}
		}
		return "未知操作";
	}
	
	public String getOperationString() {
		return operationString;
	}

	public void setOperationString(String operationString) {
		this.operationString = operationString;
	}
	public int getKey() {
		return key;
	}

	public void setKey(int key) {
		this.key = key;
	}

}
